package com.japstudy.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.japstudy.dao.IUserDao;
import com.japstudy.entity.User;
import com.japstudy.service.IUserService;

@Service
public class UserServiceImpl implements IUserService{
	
	@Autowired
	private IUserDao iUserDao;

	@Override
	public User login(User user) {
		return iUserDao.login(user);
	}

	@Override
	public int regist(User user) {
		return iUserDao.add(user);
	}

	@Override
	public User selectById(String userId) {
		return iUserDao.selectById(userId);
	}

	@Override
	public User selectByAccount(String userAccount) {
		return iUserDao.selectByAccount(userAccount);
	}

	@Override
	public User adminLogin(User user) {
		return iUserDao.adminLogin(user);
	}

}
